import Vue from 'vue'
import VueRouter from 'vue-router'

// 导入页面组件
import Login from '@/views/Login/Login.vue'
import Reg from '@/views/Reg/Reg.vue'
import Main from '@/views/Main/Main.vue'

Vue.use(VueRouter)

// 注册路由规则
const routes = [
  // 登录页
  { path: '/login', component: Login },
  // 注册页
  { path: '/reg', component: Reg },
  // 首页
  { path: '/', component: Main },
]

const router = new VueRouter({
  routes
})

export default router
